home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / octa209s.zip / octave-2.09 / liboctave / NLP.h < prev    next >
C/C++ Source or Header  |  1996-03-03  |  3KB  |  112 lines

  1. /*
  2.  
  3. Copyright (C) 1996 John W. Eaton
  4.  
  5. This file is part of Octave.
  6.  
  7. Octave is free software; you can redistribute it and/or modify it
  8. under the terms of the GNU General Public License as published by the
  9. Free Software Foundation; either version 2, or (at your option) any
  10. later version.
  11.  
  12. Octave is distributed in the hope that it will be useful, but WITHOUT
  13. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  15. for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with Octave; see the file COPYING.  If not, write to the Free
  19. Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  20.  
  21. */
  22.  
  23. #if !defined (octave_NLP_h)
  24. #define octave_NLP_h 1
  25.  
  26. #include "dColVector.h"
  27. #include "Objective.h"
  28. #include "Bounds.h"
  29. #include "LinConst.h"
  30. #include "NLConst.h"
  31. #include "base-min.h"
  32.  
  33. class
  34. NLP : public base_minimizer
  35. {
  36. public:
  37.  
  38.   NLP (void)
  39.     : base_minimizer (), phi (), bnds (), lc (), nlc () { }
  40.  
  41.   NLP (const ColumnVector& x, const Objective& obj)
  42.     : base_minimizer (x), phi (obj), bnds (), lc (), nlc () { }
  43.  
  44.   NLP (const ColumnVector& x, const Objective& obj, const Bounds& b)
  45.     : base_minimizer (x), phi (obj), bnds (b), lc (), nlc () { }
  46.  
  47.   NLP (const ColumnVector& x, const Objective& obj, const Bounds& b,
  48.        const LinConst& l)
  49.     : base_minimizer (x), phi (obj), bnds (b), lc (l), nlc () { }
  50.  
  51.   NLP (const ColumnVector& x, const Objective& obj, const Bounds& b,
  52.        const LinConst& l, const NLConst& nl)
  53.     : base_minimizer (x), phi (obj), bnds (b), lc (l), nlc (nl) { }
  54.  
  55.   NLP (const ColumnVector& x, const Objective& obj, const LinConst& l)
  56.     : base_minimizer (x), phi (obj), bnds (), lc (l), nlc () { }
  57.  
  58.   NLP (const ColumnVector& x, const Objective& obj, const LinConst& l,
  59.        const NLConst& nl)
  60.     : base_minimizer (x), phi (obj), bnds (), lc (l), nlc (nl) { }
  61.  
  62.   NLP (const ColumnVector& x, const Objective& obj, const NLConst& nl)
  63.     : base_minimizer (x), phi (obj), bnds (), lc (), nlc (nl) { }
  64.  
  65.   NLP (const ColumnVector& x, const Objective& obj, const Bounds& b,
  66.        const NLConst& nl)
  67.     : base_minimizer (x), phi (obj), bnds (b), lc (), nlc (nl) { }
  68.  
  69.   NLP (const NLP& a)
  70.     : base_minimizer (a), phi (a.phi), bnds (a.bnds), lc (a.lc), nlc (a.nlc)
  71.       { }
  72.  
  73.   NLP& operator = (const NLP& a)
  74.     {
  75.       if (this != &a)
  76.     {
  77.       base_minimizer::operator = (a);
  78.  
  79.       phi = a.phi;  
  80.       bnds = a.bnds;
  81.       lc = a.lc;
  82.       nlc = a.nlc;
  83.     }
  84.       return *this;
  85.     }
  86.  
  87.   virtual ~NLP (void) { }
  88.  
  89.   Objective objective (void) const { return phi; }
  90.  
  91.   Bounds bounds (void) const { return bnds; }
  92.  
  93.   LinConst linear_constraints (void) const { return lc; }
  94.  
  95.   NLConst nonlinear_constraints (void) const { return nlc; }
  96.  
  97. protected:
  98.  
  99.   Objective phi;
  100.   Bounds bnds;
  101.   LinConst lc;
  102.   NLConst nlc;
  103. };
  104.  
  105. #endif
  106.  
  107. /*
  108. ;;; Local Variables: ***
  109. ;;; mode: C++ ***
  110. ;;; End: ***
  111. */
  112.